#ifndef __PINDIVIDUAL_H__
#define __PINDIVIDUAL_H__

#include <list>

/** program individual **/
class Pindividual {
	/**
	 * stack : list 
	 * heap : not used now
	 * _init_ : = predefined start
	 * size : = 
	 *
	 **/
	private:
		list <Pinstruction> Genome;
		list <unsigned int> stack;

		/** predefined Pinstructions **/
		unsigned int pop();
		void push(unsigned int value);
		Value call(Value address, list<Value>args);
		void ret();
		Value giveBirth();
		Value kill();
		Value add(Value a, Value b);
		Value subtract(Value a, Value b);

	public:
		void start(); /** start the thread**/

	public:
		static Pindividual *create();
	private:
		static void* _init_(void*); /** starting thread **/

};


/*
 *	p = Pinvidual.create();
 *	p->start();
 *	this->call(address, args); //? push counter
 *	this->ret(); // return to counter
 *	this->giveBirth(this->replicate());  //?
 *	p->kill(); // kill itself
 *	score = Pindividual.evaluate(p); 
 *	Pindividual.kill(p); // force kill
 *	Pindividual.reap(p);
*/


#endif
